/**
 * @file 路由白名单
 * @author its-wild(https://gitee.com/its-wild)
 * @date 2022/08/24
 */
import { defineStore } from 'pinia'

export const useWhiteListStore = defineStore('useWhiteListStore', {
  state: (): IWhiteListStore => {
    return {
      whiteList: [],
      menu: [],
      breadcrumb: []
    }
  },
  actions: {
    setWhiteList(data: Array<string>) {
      this.whiteList = data || []
    },
    setMenu(data: Array<IMenu>) {
      this.menu = data || []
    },
    setBreadcrumb(data: Array<IMenu>) {
      this.breadcrumb = data || []
    },
  }
})
